package com.key.modules.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.key.modules.cache.MybatisCache;
import com.key.modules.dto.SysUserSelectDTO;
import com.key.modules.entity.SysUser;
import com.key.modules.vo.IndentVO;
import com.key.modules.vo.SysUserVO;
import org.apache.ibatis.annotations.CacheNamespace;
import org.apache.ibatis.annotations.Param;
import org.apache.shiro.authc.Account;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * @Author：朕
 * @Package：com.key.modules.mapper
 * @Project：logistics_system
 * @name：SysUserMapper
 * @Date：2023/3/23 20:07
 * @Filename：SysUserMapper
 */
@Repository
@CacheNamespace(implementation = MybatisCache.class, eviction = MybatisCache.class)
public interface SysUserMapper extends BaseMapper<SysUser> {

    //显示用户
    List<SysUserVO> findSysUser(Page<SysUserSelectDTO> page);

    //根据账户查询用户
    SysUser selectByAccount(String account);

    //新增用户角色
    int addRoleIdByUserId(Map<String,Object> map);

    //根据用户Id删除角色
    int deleteRoleIdByUserId(Integer userId);



}
